/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.core.main;

import com.core.dao.impl.CityDAOImpl;
import com.core.dao.impl.CountryDAOImpl;
import com.core.dao.impl.DepartmentDAOImpl;
import com.core.dao.impl.HumanDAOImpl;
import com.core.dao.impl.JobDAOImpl;
import com.core.dao.impl.QualificationDAOImpl;
import com.core.dao.impl.StateDAOImpl;
import com.core.entities.City;
import com.core.entities.Country;
import com.core.entities.Department;
import com.core.entities.Human;
import com.core.entities.Job;
import com.core.entities.Qualification;
import com.core.entities.State;
import com.core.exception.DAOException;

/**
 * 
 * @author himanasser
 */
public class Main {
	public static void main(String[] args) throws DAOException {

		Country country = new Country();
		State state = new State();
		City city = new City();
		Job job = new Job();
		Qualification qualification = new Qualification();
		Department department = new Department();
		Human human = new Human();

		country.setName("Egypt");

		state.setName("cairo");
		state.setCountry_id(1);

		city.setName("dar elsalam");
		city.setState_id(1);

		job.setName("developer");
		job.setDescription("java lang");

		qualification.setName("Computer Scince Bacholer");
		qualification.setCollage("Computer Scince Collage");
		qualification.setDegree("Good");
		qualification.setSpecificationId(1);
		qualification.setYear("2010");

		department.setName("Managment");
		department.setDescription("Manage all system");

		human.setFirst_name("Ibrahim");
		human.setSecond_name("Abdel Nasser");
		human.setThird_name("Ibrahim");
		human.setLast_name("Alsaman");
		human.setBirthdate("1986-08-25");
		human.setAddress("1 Abdu Rabo - Mohamed Saeed - Dar Esalam");
		human.setMobile_phone("01117008387");
		human.setLand_phone("027188711");
		human.setEmail("ibrahim.alsaman@gmail.com");
		human.setRole("Adminisrator");
		human.setUsername("ibrahim.alsaman");
		human.setPassword("ahmedhima");
		human.setCity_id(1);
		human.setNational_id_number("881311241");
		human.setSalary("2000");
		human.setJob_id(1);
		human.setQualification_id(1);
		human.setDepartment_id(1);

//		 new CountryDAOImpl().insert(country);
//
//		 new StateDAOImpl().insert(state);
//
//		 new CityDAOImpl().insert(city);
//
//		 new JobDAOImpl().insert(job);
//
//		 new QualificationDAOImpl().insert(qualification);
//
//		 new DepartmentDAOImpl().insert(department);

		 new HumanDAOImpl().insert(human);

//		 new CityDAOImpl().findById(2);
//
//		 new CityDAOImpl().findAll();
//
//		 new CityDAOImpl().update(city);
//
//		 new CityDAOImpl().delete(5);
//
//		 new CityDAOImpl().findByName("mokatam");
//
//		 new CityDAOImpl().findByState_id(2);
//
//		 new HumanDAOImpl().findByCity_id(2);
//
 new HumanDAOImpl().findAll();

	}

}
